package com.aimosheng.main.http;

import com.aimosheng.common.CommonAppConfig;
import com.aimosheng.common.http.HttpCallback;
import com.aimosheng.common.http.HttpClient;

/**
 * @ClassName: TaskHttpUtil
 * @Author: wangjiang
 * @CreateDate: 2021/6/23 16:15
 * ---------------------------------------
 * @Description: java类作用描述
 **/
public class TaskHttpUtil {


    /**
     * 检测当天是否还能观看激励视频任务
     * @param callback
     */
    public static void getRewardVideoCount(HttpCallback callback) {
        HttpClient.getInstance().get("Excitation.todayLook", TaskHttpConsts.GET_REWARD_VIDEO_COUNT)
                .params("uid", CommonAppConfig.getInstance().getUid())
                .params("token", CommonAppConfig.getInstance().getToken())
                .execute(callback);
    }

    /**
     * 激励视频任务兑换积分
     * @param callback
     */
    public static void getVotesExcitation(int votes,HttpCallback callback) {
        HttpClient.getInstance().get("Votes.excitation", TaskHttpConsts.GET_REWARD_VIDEO_COUNT)
                .params("uid", CommonAppConfig.getInstance().getUid())
                .params("token", CommonAppConfig.getInstance().getToken())
                .params("votes", votes)
                .execute(callback);
    }
    /**
     * 激励视频任务兑换积分
     * @param callback
     */
    public static void AddExcitationRecord(HttpCallback callback) {
        HttpClient.getInstance().get("Excitation.addRecord", TaskHttpConsts.ADD_REWARD_RECORD)
                .params("uid", CommonAppConfig.getInstance().getUid())
                .params("token", CommonAppConfig.getInstance().getToken())
                .execute(callback);
    }

}
